package com.mrx.pvzcommunity.model;

public class Response {

    public enum Code {
        SUCCESS(0, "成功"),
        NOT_FOUND(-1, "找不到数据"),
        USER_NOT_LOGGED(-2, "用户未登录"),
        NEED_ARG(-3, "需要参数"),
        INTERNAL_SERVER_ERROR(-4, "服务器内部错误"),
        REG_FAILURE_INTERNAL_ERROR(-5, "注册失败, 内部错误"),
        REG_FAILURE_UNKNOWN_ERROR(-6, "注册失败, 未知错误"),
        REG_FAILURE_ACCOUNT_EXISTS(-7, "注册失败, 账号已存在"),
        LOG_FAILURE_ACCOUNT_NOT_EXISTS(-8, "登录失败, 账号不存在"),
        LOG_FAILURE_ACCOUNT_OR_PASS_ERR(-9, "登录失败, 账号或密码错误"),
        THREADS_NOT_EXISTS(-10, "帖子不存在"),
        UNKNOWN_ERROR(-10, "未知错误");

        public final int code;
        public final String desc;

        Code(int code, String desc) {
            this.code = code;
            this.desc = desc;
        }
    }
}
